package itcast.bos.base.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import itcast.bos.domain.base.Standard;


public interface StandardRepostory extends JpaRepository<Standard, Integer>{

	List<Standard> findByName(String a);

	List<Standard> findByNameLike(String string);

	List<Standard> findByNameAndId(String string, int i);

	List<Standard> findByNameOrId(String string, int i);
	
	@Query(value="from Standard",nativeQuery=false)
	List<Standard> queryAll();
	
	@Query
	List<Standard> findItByGrantThenId(int i);
	
	@Query(value="update Standard set minLength = ?2 where id = ?1 ")
	@Modifying
	void upDateMinLengthById(int i, int j);

	

	
	
}
